package com.sky.mapper;

import com.sky.anotion.AutoFill;
import com.sky.anotion.AutoId;
import com.sky.entity.Competition;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;

@Mapper
public interface CompetitionMapper {
    /**
     * 插入竞赛
     * @param competition 竞赛信息
     */
    @AutoId
    void insert(Competition competition);

    /**
     * 根据id删除竞赛
     * @param id 竞赛id
     */
    void deleteById(String id);

    /**
     * 更新竞赛信息
     * @param competition 竞赛信息
     */
    void update(Competition competition);

    /**
     * 根据id查询竞赛
     * @param id 竞赛id
     * @return 竞赛信息
     */
    Competition getById(String id);
}
